#include<iostream>
#include"headf.h"
using namespace std;


int main() {
	int a[5] = { 1,2,3,4,5 };
	int x, i, b;

	cin >> x;
	for (i = 0; i < 5; i++)
	{
		b = a[i];
		chazhao(i, b, x);
		if (chazhao(i, b, x) == i)break;


	}

	return(chazhao(i, b, x));
}